<?php

class Street extends Eloquent{

	/**
	 * The database table used by the model.
	 *
	 * @var string
	 */

	protected $table = 'streets';
	public $timestamps = false;
	
	public function town(){
		$town = $this->belongsTo('Town', 'town_id');
		return $town != null ? $town : null;
	}

	public function address(){
		$address = $this->hasMany('Address', 'street_id');
		return $address != null ? $address : null;
	}
}